var GameParam = pc.createScript('GameParam');

GameParam.prototype.initialize = function() {
    
    
    var app = this.app;
    var camera = app.root.findByName('Camera');
    var bounds = app.root.findByName('bound');
    var leftbound = bounds.findByName('left');
    var middlebound = bounds.findByName('middle');
    var rightbound = bounds.findByName('right');

    this.worldheight = camera.camera.orthoHeight*2;
    this.worldwidth = this.worldheight*window.innerWidth/window.innerHeight;
    this.bigboundscale = 4/135*this.worldwidth;
    this.smallboundscale = 2/135*this.worldwidth;
    this.roadwidth = 127/135*this.worldwidth*0.25;
    
    leftbound.setLocalScale(this.smallboundscale,1,this.worldheight);
    leftbound.setLocalPosition(-this.bigboundscale*0.5-this.roadwidth-this.smallboundscale*0.5,0,0);
    middlebound.setLocalScale(this.bigboundscale,1,this.worldheight);
    middlebound.setLocalPosition(0,0,0);
    rightbound.setLocalScale(this.smallboundscale,1,this.worldheight);
    rightbound.setLocalPosition(this.bigboundscale*0.5+this.roadwidth+this.smallboundscale*0.5,0,0);
    this.playerpositions = [];
    var rlx = this.bigboundscale*0.5+this.roadwidth*0.5, 
        rrx = this.bigboundscale*0.5+this.roadwidth+this.smallboundscale+0.5*this.roadwidth,
        llx = -rrx,
        lrx = -rlx;
    
    this.playerpositions.push(llx);
    this.playerpositions.push(lrx);
    this.playerpositions.push(rlx);
    this.playerpositions.push(rrx);
     
};

GameParam.prototype.update = function(dt) {
    
};
